## 面向对象的三大特性

# 1. 封装
# 1. 继承: 继承的目的就是继承资源。
#     1. 单继承
#     1. 多继承:  拿到多方的资源
# 1. 多态

class Animal:
    a = 1
    _b = 2
    __c = 3
    def t1(self):
        print('t1')
    def _t2(self):
        print('t2')
    def __t2(self):
        print('t3')
    def __init__(self):
        print('init,Animal')

class XXX:
    pass

class Dog(Animal, XXX):
    pass

class Person(Animal):
    def test(self):
        print(self.a)
        print(self._b)
        # print(self.__c)
        
        self.t1()
        self._t2()
        # self.__t3()
        self.__init__()
p = Person()
print(p)
print(p.test())

print(100*'-')

print(Animal.__bases__)
print(XXX.__bases__)

print(Dog.__bases__)

print(bool.__bases__)
print(int.__bases__)
print(float.__bases__)

print(float.__class__) # type 和 object 的区别

print(Dog.__class__)
print(object.__class__)
